# Contributor: Dermot Bradley <dermot_bradley@yahoo.com>
# Maintainer: Dermot Bradley <dermot_bradley@yahoo.com>
pkgname=step-kms-plugin
pkgver=0.9.2
pkgrel=0
pkgdesc="Step plugin to manage keys and certs on KMSs and HSMs"
url="https://github.com/smallstep/step-kms-plugin"
arch="all"
license="Apache-2.0"
makedepends="
	go
	pcsc-lite-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/smallstep/step-kms-plugin/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make VERSION=$pkgver build
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
13e029fb0c2ba2d42fb75ed3be5d233f0ed1890453439ca8d4c53e8b0b4dce0f7b311c4ce506845f823ed46b31c66f7c17aefc132ba3f1f3761d263936434cb7  step-kms-plugin-0.9.2.tar.gz
"
